<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="">

<style py:match='style'   type="text/css">
  ${select("*|text()")}
</style>

<script py:match='script' type='text/ecmascript' src='${select("@src")}'>
${select("*|text()")}
</script>

<form py:match='tableform' method="post" enctype="multipart/form-data"
      class="tableform" id='${select("@id")}' action="${select('@action')}">
    ${select('*|text()')}
</form>

<tr py:match='widewidget'>
  <td colspan='2'>${select('@label')}:<br />
      ${select('*|text()')}
  </td>
</tr>

<img py:match='edit' src="/wp/pencil.png" alt="alterar"  title="alterar" />

<img py:match='new'  src="/wp/new2.png" alt="adicionar"  title="adicionar" />

<img py:match='view' src="/wp/view.png" alt="visualizar" title="visualizar" />

<py:def function="import_jquery_ui()">
<script type="text/ecmascript" src="/wp/jquery/jquery.js"></script>
<script type="text/ecmascript" src="/wp/jquery/jquery.ui.all.packed.js"></script>
</py:def>

<py:def function="import_formetto()">
<script type="text/ecmascript" src="/wp/strDic.js"></script>
<script type="text/ecmascript" src="/wp/formetto.js"></script>
</py:def>

<h1 py:def="blog_name(blog, feed_img='/wp/feed14.png')" class='BlogName'>
  <a py:content='blog.name' title='${blog.summary}'
     href="${url('Blog', blogId=blog.slug)}" />&nbsp;
  <a href="${url('Blog', blogId=blog.slug, action='rss')}">
    <img alt='feed' title='Assine o feed "${blog.name}"' src='${feed_img}' />
  </a>
  <a class='AddPost' py:if="blog.canBeEditedByCurrentUser"
     href="${url('BlogPost', action='edit', postId='0', blogId=blog.id)}">
    <img src="/wp/new2.png" alt="adicionar" title="adicionar" />
  </a>
</h1>

<div py:match='blogTitle' py:if="defined('blog')">
    ${blog_name(blog)}
    <div py:if='blog.summary' class="BlogSummary" py:content='blog.summary' />
</div>

<py:match path='postTitle'>
  <h1 py:if="defined('post')" class='PostName'>
    ${post.name}
    <py:if test="defined('blog') and blog.canBeEditedByCurrentUser">
      <a href='${url("BlogPost", action="edit", postId=post.id, blogId=blog.id)}'>
        <edit />
      </a>
    </py:if>
    <py:if test="not defined('blog') and auth.has_permission('PostEdit')()">
      <a class='AddPost'
         href="${url('Post', postId='0',  kind=o.kind, action='edit')}"
         ><new /></a>
      <a href='${url("Post", postId=post.id, kind=post.kind, action="edit")}'
         ><edit /></a>
    </py:if>
  </h1>
  <h1 py:if="not defined('blog') and not defined('post') and defined('pagetitle')"
      class='PageTitle' py:content='pagetitle' />
</py:match>

<a py:def="to_top(divname='Dimensions')" class='ToTop'
   onclick="document.getElementById('${divname}').scrollIntoView();">
  <img alt='' title='para o topo' src='/wp/to-top.png' />
</a>

</html>
